package org.htmlparser.tags;

import org.htmlparser.lexer.Page;
import org.htmlparser.nodes.TagNode;

public class FrameTag extends TagNode
{
  private static final String[] mIds;

  static
  {
    String[] arrayOfString = new String[1];
    arrayOfString[0] = "FRAME";
    mIds = arrayOfString;
  }

  public String getFrameLocation()
  {
    String str = getAttribute("SRC");
    if (str == null)
      str = "";
    while (true)
    {
      do
        return str;
      while (getPage() == null);
      str = getPage().getAbsoluteURL(str);
    }
  }

  public String getFrameName()
  {
    return getAttribute("NAME");
  }

  public String[] getIds()
  {
    return mIds;
  }

  public void setFrameLocation(String paramString)
  {
    setAttribute("SRC", paramString);
  }

  public String toString()
  {
    return "FRAME TAG : Frame " + getFrameName() + " at " + getFrameLocation() + "; begins at : " + getStartPosition() + "; ends at : " + getEndPosition();
  }
}